package data;

//Interface for everything that's sendable
public abstract class Data {

	public static final byte AUTH = 0;
	public static final byte KEEP_ALIVE = 1;
	public static final byte LOGOUT = 2;
	public static final byte MESSAGE = 3;
	public static final byte MAP_DATA = 4;
	
	protected byte[] data;
	
	protected Data() {}
	protected Data(byte[] data) {
		this.data=data;
	}
	
	//get data as byte array
	public byte[] getData() {
		return data;
	}
	//get data with 3 byte header
	//for sending to server
	public abstract byte[] getDataWithHeader();
	//Only necessary to implement if server sends
	//non static??
	protected abstract void process(short len);
}
